package com.example.leetcode.test;

public class FiledHasNotPolymorphic {

    static class Father{
        public int money = 1;

        public  Father() {
            money = 2 ;
            showMoney();
          //  System.out.println("father money:" + money);
        }

        public void showMoney () {
            System.out.println("i am father ,money:" + money);
        }

    }

    static class Son extends Father{
        public int money = 3;


        public Son(){
            money = 4;
            showMoney();
       //     System.out.println("son money:" + money);
        }

        public void showMoney() {
            System.out.println("i am son ,money:" + money);
        }
    }

    public static void main(String[] args) {
        Father father = new Son();

    }
}
